// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

// partially copied from https://github.com/code42day/stylus-font-face
// TODO: restrict glyph ranges and inline fonts
// TODO: possibly include other font types (eg ttf)
file($name, $ext, $path)
  $path + '/' + $name + '.' + $ext

font-face($family, $style='normal')
  @font-face
    font-family $family
    src url(file($family, 'woff2', '../fonts')) format('woff2'), url(file($family, 'woff', '../fonts')) format('woff')
    font-weight normal
    font-style $style
    text-rendering optimizeLegibility

font-face('Lato-Light')
font-face('Lato-Bold')
font-face('Lato-Regular')
font-face('Lato-Medium')
font-face('RobotoMono-Bold')
font-face('RobotoMono-Regular')
font-face('RobotoMono-Medium')
font-face('Inconsolata-Regular')
font-face('SourceSansPro-Bold')
font-face('SourceSansPro-Regular')
font-face('SourceSansPro-SemiBold')
font-face('SFMono-Semibold')
